import { SelectOptionsType } from './ElementUI'

export interface Dictionary<T> {
  [key: string]: T
}
export type ColorType = string | fabric.Pattern | fabric.Gradient
// type of response data for each network request
export interface ResponseDataType<T> {
  Code: number
  Message: string
  ReturnData: T
}
// relative message of user
export interface WorkersList {
  name: string
  position: string
  avator: string
}
export interface BasicEmployeeType {
  Name: string
  Position: string
  DepartmentName: string
}
// basic data presented by the task
export interface TaskCardType {
  name: string
  status: string
  operator: string
  savetime: string
}
// 自定义组件
// ws-timeline
export interface TimeLineSetting {
  name: string
  label: string
  type: 'completed' | 'uncompleted'
  disabled: boolean,
  content: Dictionary<string>
}
// ws-apartment-group
export type ApartmentListType = {
  title: string
  employees: Dictionary<string | number>[]
}[]
// task-tab 组件需要的数据格式
export interface SettingType {
  label: string
  key: string
  value: string
  type: string
  unit: string
  disabled: boolean
  settings?: Dictionary<any>
  options?: SelectOptionsType<string>
}